package cn.zongjie.day05;

public class Demo9 {
    public static void main(String[] args) {
        System.out.println(up(4));
    }

    public static int up(int num) {
        if (num == 1 || num == 2) {
            return num;
        } else {
            return up(num - 1) + up(num - 2);
        }
    }
}
